home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1998 August / PC Direct August 1998.iso / S / powerj / Product / hpp.z / dtjpicbn.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-25  |  2.9 KB  |  90 lines

  1. // Design Time Java PictureButton  implementation. (HPP)
  2.  
  3. #ifndef _DTJPICBN_HPP
  4. #define _DTJPICBN_HPP
  5.  
  6. #include "dtjcomp.hpp"
  7.  
  8. enum LabelPosition {
  9.     eLabelPositionTOP = 1,
  10.     eLabelPositionBOTTOM = 2
  11. };
  12.  
  13. enum URLType {
  14.     ABSOLUTE_URL,
  15.     DOCUMENT_BASED_URL,
  16.     CODE_BASED_URL
  17. };
  18.  
  19. class METAEXPORTCLASSDEF DTJPictureButton : public DTJComponent 
  20. {
  21.     public:
  22.         DTJPictureButton( const MetaObject * pMetaObj );
  23.         virtual ~DTJPictureButton();
  24.  
  25.         // URLType
  26.         //
  27.         //    The URL type: Absolute or relative based on the URL of
  28.         //    the document or of the applet code.
  29.                 
  30.         virtual URLType GetURLType() const;
  31.         virtual WBool   SetURLType( URLType t );
  32.  
  33.         //
  34.         // DefaultStyle
  35.         //
  36.         //    The style with which new instances are created.  Default
  37.         //    implementation returns GetWindow()->GetDefaultStyle().
  38.  
  39.         virtual WStyle                GetDefaultStyle() const;
  40.  
  41.         virtual WBool Create( WWindow * parent, const WRect & r,
  42.                               const WChar * text, WStyle style,
  43.                               WStyle exStyle, void * data, WBool isLoading );
  44.                                
  45.         virtual void GenerateCode( MMCodeGeneration mmCodeGen,
  46.                                    ostream& src,
  47.                                    MMCodeGenerationParms& pGenParms );
  48.  
  49.     virtual void GenerateTextProp( const WString& objPrefix, ostream& src,
  50.                        MMJCodeGenerationParms * ) const;
  51.  
  52.         // The following properties are for C++ form painting only.
  53.         virtual WLong GetInsetsTop() const;
  54.         virtual void  SetInsetsTop( WLong value );
  55.         virtual WLong GetInsetsBottom() const;
  56.         virtual void  SetInsetsBottom( WLong value );
  57.         virtual WLong GetInsetsLeft() const;
  58.         virtual void  SetInsetsLeft( WLong value );
  59.         virtual WLong GetInsetsRight() const;
  60.         virtual void  SetInsetsRight( WLong value );
  61.         virtual const WChar * GetURL() const;
  62.         virtual void  SetURL( const WString & url );
  63.         virtual LabelPosition GetLabelPosition() const;
  64.         virtual void  SetLabelPosition( LabelPosition value );
  65.  
  66.     protected:
  67.         virtual void GenerateCreate( const WString& objPrefix,
  68.                                  ostream& src,
  69.                        MMJCodeGenerationParms* pGenParms ) const;
  70.  
  71.     private:
  72.         WLong _insets_top;
  73.         WLong _insets_bottom;
  74.         WLong _insets_left;
  75.         WLong _insets_right;
  76.  
  77.         URLType _url_type;
  78.         WString _url;
  79.         
  80.         LabelPosition _label_position;
  81. };
  82.  
  83. extern WBool METAEXPORTDEF DP_JPictureButtonEnum( const DTObject *, const MMBaseProperty * );
  84.  
  85. // needed for mdreader
  86. typedef DTJPictureButton DTpowersoft__dot__powerj__dot__ui__dot__PictureButton__dot__102;
  87. typedef WPictureButton powersoft__dot__powerj__dot__ui__dot__PictureButton__dot__102;
  88.  
  89. #endif // _DTJPICBN_HPP
  90.